<template>
  <div class="storeintroduce-container">
    <div class="storeintroduce-top">
      <img class="top-imgBg" :src="headimg" alt>
      <div class="box"></div>
      <span class="top-text">{{ items.diningName }}</span>
      <span class="top-text0">{{ notice }}</span>
    </div>
    <div class="foottype-container boxjiushi">
      <div class="typesbox">

        <h1 class="storeintroduce-detail">{{ items.diningIntro }}</h1>
        <h1 class="storeintroduce-detail">{{ items.address }}</h1>
        <h1 class="storeintroduce-detail">{{ items.phone }}</h1>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      headimg: localStorage.getItem('bannerimg'),
      items: [],
      notice: ''
    };
  },
  created() {
    this.Suk_getlist();
    this.Suk_getnotice()
  },
  activated() {

  },
  methods: {
    Suk_getlist() {
      let that = this;
      that.$toast.loading({
        message: "加载中..."
      });
      var Sukdata = {
        dinId: localStorage.getItem("storeid")
      };
      console.log(Sukdata);
      that.axios
        .post(
          that.baseUrl + "/dining/addXiangQIng",
          that.Qs.stringify(Sukdata),
          {
            headers: {
              "Content-Type": "application/x-www-form-urlencoded"
            }
          }
        )
        .then(function (res) {
          if (res.request.status === 200) {
            if (res.data.meta.code == 200) {
              debugger
              that.items = res.data.data;
              that.$toast.clear();
            } else if (res.data.meta.code == 501) {

            }
          }
        });
    },
    Suk_getnotice() {
      let that = this;
      that.$toast.loading({
        message: "加载中..."
      });
      var Sukdata = {
        din_id: localStorage.getItem('storeid')
      };
      console.log(Sukdata);
      that.axios
        .post(that.baseUrl + "/notice/getNotice", that.Qs.stringify(Sukdata), {
          headers: {
            "Content-Type": "application/x-www-form-urlencoded"
          }
        })
        .then(function (res) {
          if (res.request.status === 200) {
            if (res.data.meta.code == 200) {
              console.log(res.data, 'notice');
              that.notice = res.data.data[0].content
              that.$toast.clear();
            } else if (res.data.meta.code == 501) {

            }
          }
        });
    }
  },

};
</script>
<style scoped>
.storeintroduce-container {
  width: 100%;
  margin: 0 auto;
  font-size: 0.3rem;
}

.box {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

.storeintroduce-top {
  position: relative;

  height: auto;
  overflow: hidden;
  margin-bottom: 20px;
}

.top-imgBg {
  width: 100%;
}

.top-text {
  position: absolute;
  left: 5%;
  top: 15px;
  color: #fff;
  font-size: 18px;
}

.top-text0 {
  position: absolute;
  left: 5%;
  top: 45px;
  color: #fff;
}

.storeintroduce-detail {
  text-indent: 25px;
  padding: 0 20px;
  font-size: 16px;
  line-height: 30px;
}

.foottype-container {
  overflow: hidden;
}

.boxjiushi {
  width: 90%;
  margin: 0 auto;
}

.typesbox {
  width: 100%;
  display: flex;
  float: left;
  flex-direction: column;
  margin-top: 18px;
  color: #5d3b24;
  font-size: 10px;
}
</style>
